<template>
  <div>
    <el-table :data="orderQueryData" style="width: 100%" size="min" height='calc(100vh - 200px)'>
      <el-table-column type="index" :index="indexMethod" label="编号" width="100"> </el-table-column>
      <el-table-column prop="id" label="编号" width="100"> </el-table-column>
      <el-table-column prop="orderTime" label="订单时间" width="200"></el-table-column>
      <el-table-column prop="total" label="订单总数" width="120"></el-table-column>
      <el-table-column prop="status" label="状态" width="120"></el-table-column>
      <el-table-column prop="remark" label="评论" width="120"></el-table-column>
      <el-table-column prop="customerId" label="顾客编号" width="120"></el-table-column>
      <el-table-column prop="waiterId" label="服务员编号" width="120"></el-table-column>
      <el-table-column prop="addressId" label="地址编号" width="120"></el-table-column>
    </el-table>
  </div>
</template>

<script>
import { mapActions, mapState } from "vuex";
export default {
  data() {
    return { 
        customerId:this.$route.params.id,
    };
  },
  computed: {
    ...mapState("order", ["orderQueryData"]),
  },
  methods: {
    ...mapActions("order", ["query"]),
    indexMethod(index){
      return index+1;
    },
    
  },
  created() {
    this.query({customerId:this.customerId});
  },
};
</script>

<style>
</style>